<!DOCTYPE html>
<html>

<?php 

require_once("DB_Config.php");


// $q = 'SELECT * FROM state';
$db_connect = DB_Connection::getInstance();


?>

<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<link href="css/style.css" rel='stylesheet' type='text/css' />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.package-slider.js"></script>
<script type="text/javascript" src="js/jquery.dropdown.js"></script>
<title>A&A ONLINE HOUSE SHOWER - Contact Page</title>

</head>

<body>

<!-- START HEADER WRAPER-->
<div id="header-color">
	<div id="header-wrapper">
		<?php require_once("header.php"); ?>
        <b class="hellouser"> Hello Visitor <b>
	</div>
</div>


<!-- START CONTENT WRAPER-->

<div id="page-content" style="margin-left:150px; background: rgba(120, 158, 19, 0.81);border-radius: 90px;width: 1000px;margin-left: auto;margin-right: auto;">

<form name="contact_form" class="contact_form" method="post" action="">
   <i style=" margin: 0 0 0 320px; ">Contact Form :: Feel Free To Contact Us </i>
    <div class="contact_form">
        <div class="colReg" >
        	
            <ul>
                <li class="register">First Name:</li>
                <li class="register">Last Name:</li>
                <li class="register">E-mail address:</li>
                <li class="register">Comment:</li>
            </ul>
        </div>
       
        <div class="colReg" >
            <ul class="regBull">
                <li><input type="text" class="input" style="maxlength="10"" id="fname" name="fname" title="Please enter your first name"></li>
                <li><input type="text" class="input" style="maxlength="10"" id="lname" name="lname" title="Please enter your last name" ></li>
                <li><input type="text" class="input" style="maxlength="10"" id="email" name="email" title="Please enter your E-mail address"></li>
                <li><textarea rows="6" cols="17" style=" margin: 9px 0 0 7px; ">Leave Comment Here.</textarea></li>
                <button style="width:130px;margin-left: 32px;" value="Send" class="head_button" onClick="location.href='index.php'">Send</button>
            </ul>
        </div>

        <div class="colReg" >
            <img src="images/reg_house1.png" style=" margin: 0px 0 0 10px; width: 60%; float: right;">
        </div>


            <?php if( isset($_POST['Registration']) ){  //Posted By Form (name="Registration")
            $inspection = userRegister($_POST['username'], $_POST['fname'], $_POST['lname'], $_POST['email'], $_POST['emailc'], $_POST['password'], $_POST['passwordc'], $_POST['pos']);
                if ($inspection[0]==1) {header("location:index.php");}
            ?>

        <div class="colReg" >            
            <ul>

                <li class="register"><?php if ($inspection[1]==0) { ?> User Name to short.<?php } ?> 
                                     <?php if ($inspection[2]==0) { ?>User Name have to be from letters and numbers   <?php } ?>&nbsp</li>
                <li class="register"><?php if ($inspection[3]==0) { ?>First Name to short<?php } ?>       
                                     <?php if ($inspection[4]==0) { ?>First Name have to be from letters<?php } ?>&nbsp</li>       
                <li class="register"><?php if ($inspection[5]==0) { ?>Last Name to short<?php } ?>
                                     <?php if ($inspection[6]==0) { ?>Last Name have to be from letters and numbers<?php } ?>&nbsp</li>
                <li class="register"><?php if ($inspection[7]==0) { ?>This E-mail address is not valid<?php } ?>&nbsp</li>
                
           
        </div>

        <?php if ($inspection[0]==2) { ?><p> <li class="register">&nbsp&nbsp Error Occurred on Login </li> <?php } ?>
        <?php if ($inspection[0]==0) { ?><p> <li class="register">&nbsp&nbsp Registration haven't been made </li> <?php } ?>
        <?php } ?>
        
     </div>
 </form>
</div>

<!-- END CONTENT WRAPER-->


<!-- START FOOTER WRAPER-->
<p><?php require("footer.php"); ?></p>
</body>
</html>